<?php
$oJobgroups = JobgroupHandler::getJobgroups();
?>

<script language="JavaScript">
	var sNames = new Array();
<?php
foreach ($oJobgroups as $oThisJobgroup)
{
	?>
	sNames[<?php print $oThisJobgroup->iID ?>] = new String('<?php print addslashes($oThisJobgroup->sName) ?>');
	<?php
}
?>
</script>

<?php
loadBox('jobgroup-add');
loadBox('jobgroup-change');
loadBox('jobgroup-delete');
?>

<table class="boxborder" cellspacing="0">
	<tr>
		<td class="boxhandle" colspan="2"><?php print msg('Projectgroups') ?></td>
	</tr>
	<tr>	
		<td class="control small" colspan="2" nowrap>
			<a href="index.php?sView=job-list"><?php print msg('Projects') ?></a> | <?php print msg('Projectgroups') ?></a> |
		</td>
	</tr>
	<tr>
		<td class="listtop center">
			<a href="javascript: jobgroup_add();"><img src="images/<?php print $_SESSION['oUserVars']['images'] ?>/jobgroup-add.png" border="0"></a>
		</td>
		<td class="listtop"><?php print msg('Group') ?></td>
	</tr>
<?php
foreach ($oJobgroups as $oThisJobgroup)
{
	?>
	<tr>
		<td class="listentity center nowrap">
			<a href="javascript: jobgroup_delete(<?php print $oThisJobgroup->iID ?>);"><img src="images/<?php print $_SESSION['oUserVars']['images'] ?>/jobgroup-delete.png" border="0"></a>
			<a href="javascript: jobgroup_change(<?php print $oThisJobgroup->iID ?>);"><img src="images/<?php print $_SESSION['oUserVars']['images'] ?>/jobgroup-change.png" border="0"></a>
		</td>
		<td class="listentity"><?php print $oThisJobgroup->sName ?></td>
	</tr>
	<?php
}
?>
</table>
